@ECHO OFF
CLS
@ECHO	Installator for packed game (just installed, no UCP).
@ECHO	==============================================================================
@ECHO	Mod: PTMu 1.79 by PoLinii.com
@ECHO	==============================================================================
:main 
SETLOCAL EnableDelayedExpansion
@SET _CWD="%~dp0"
@CD /D "%_CWD%"
::@ECHO I'm in %_CWD%
@PAUSE
SET _PTMFOLDER=\PTMu v1_79 by PoLinii.com
CALL :DeQuote _CWD
CALL :DeSlash _CWD
CALL :DeQuote _PTMFOLDER
SET _TARGET="%_CWD%%_PTMFOLDER%"
CALL :DeQuote _TARGET
CALL :DeSlash _TARGET
GOTO :Install

:DeQuote
 FOR %%G IN (%*) DO (
 SET DeQuote.Variable=%%G
 CALL SET DeQuote.Contents=%%!DeQuote.Variable!%%
 IF [!DeQuote.Contents:~0^,1!]==[^"] (
 IF [!DeQuote.Contents:~-1!]==[^"] (
 SET DeQuote.Contents=!DeQuote.Contents:~1,-1!
 ) ELSE (GOTO :EOF no end quote)
 ) ELSE (GOTO :EOF no beginning quote)
 SET !DeQuote.Variable!=!DeQuote.Contents!
 SET DeQuote.Variable=
 SET DeQuote.Contents=
 )
 GOTO :EOF
 
:DeSlash
 FOR %%G IN (%*) DO (
 SET DeQuote.Variable=%%G
 CALL SET DeQuote.Contents=%%!DeQuote.Variable!%%
 IF [!DeQuote.Contents:~-1!]==[^\] (
 SET DeQuote.Contents=!DeQuote.Contents:~0,-1!
 ) ELSE (GOTO :EOF no end quote)
 SET !DeQuote.Variable!=!DeQuote.Contents!
 SET DeQuote.Variable=
 SET DeQuote.Contents=
 )
 GOTO :EOF
 
:Install
NFSSInjector.exe -i "%_TARGET%" "%_CWD%"

:exit
:eof
PAUSE